home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / print / gs261ini.zip / MAKE.DOC < prev    next >
Text File  |  1993-05-28  |  27KB  |  625 lines

  1.    Copyright (C) 1989, 1990, 1991, 1993 Aladdin Enterprises.  All rights reserved.
  2.  
  3. This file is part of Ghostscript.
  4.  
  5. Ghostscript is distributed in the hope that it will be useful, but
  6. WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  7. to anyone for the consequences of using it or for whether it serves any
  8. particular purpose or works at all, unless he says so in writing.  Refer
  9. to the Ghostscript General Public License for full details.
  10.  
  11. Everyone is granted permission to copy, modify and redistribute
  12. Ghostscript, but only under the conditions described in the Ghostscript
  13. General Public License.  A copy of this license is supposed to have been
  14. given to you along with Ghostscript so you can know your rights and
  15. responsibilities.  It should be in a file named COPYING.  Among other
  16. things, the copyright notice and this notice must be preserved on all
  17. copies.
  18.  
  19. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  20.  
  21. This file, make.doc, describes how to install Ghostscript, and how to
  22. build Ghostscript executables from source.
  23.  
  24. For an overview of Ghostscript and a list of the documentation files, see
  25. README.
  26.  
  27. ********
  28. ******** Installing Ghostscript
  29. ********
  30.  
  31. To install the interpreter, you need:
  32.     - The interpreter executable:
  33.         - On MS-DOS and VMS systems, gs.exe.
  34.         - On MS-DOS systems, if you are using the Watcom compiler,
  35.           the DOS extender, dos4gw.exe.
  36.         - On Unix systems, gs.
  37.     - The interpreter initialization files:    gs_*.ps.
  38.     - The font map: Fontmap.
  39.     - The default font: uglyr.gsf.
  40.  
  41. See use.doc for a description of the search algorithm used to find these
  42. files.
  43.  
  44. You do not need any of these files when using the library; however, the
  45. library currently provides no way to install fonts.  This is obviously
  46. ridiculous and will be fixed sometime in the future.
  47.  
  48. ********
  49. ******** Building Ghostscript from source
  50. ********
  51.  
  52. Ghostscript is generally distributed in the form of a compressed tar file.
  53. When unpacked, this file puts all the Ghostscript files in a directory
  54. called gs.  Ghostscript is also available in the form of PC-compatible ZIP
  55. files.
  56.  
  57. Ghostscript is described by a collection of several makefiles:
  58.  
  59.     gs.mak - a generic makefile used on all platforms (except VMS).
  60.     devs.mak - a makefile listing all the device drivers.
  61.     *.mak - the makefiles for specific platforms.
  62.  
  63. You may need to edit the platform-specific makefile if you wish to change
  64. any of the following options:
  65.  
  66.     - The default search path(s) for the initialization and font files
  67. (macro GS_LIB_DEFAULT);
  68.  
  69.     - The debugging options (macro TDEBUG);
  70.  
  71.     - The set of device drivers to be included (DEVICE_DEVS
  72.     and DEVICE_DEVS1..9 macros);
  73.  
  74.     - The set of optional features to be included (FEATURE_DEVS macro).
  75.  
  76. The platform-specific makefile will include comments describing all of
  77. these items except the DEVICE_DEVS options.  The DEVICE_DEVS options are
  78. described in devs.mak, even though the file that must be edited is the
  79. platform-specific makefile.
  80.  
  81. The makefiles distributed with Ghostscript define these options as
  82. follows:
  83.  
  84.     - GS_LIB_DEFAULT: on Unix systems, /usr/local/lib/ghostscript
  85. and /usr/local/lib/ghostscript/fonts; on MS-DOS systems, C:\GS.
  86.  
  87.     - TDEBUG: no debugging code included in the build.
  88.  
  89.     - DEVICE_DEVS*: platform-specific, see below.
  90.  
  91.     - FEATURE_DEVS: platform-specific.
  92.  
  93. There are also platform-specific options described below under the
  94. individual platforms.  See the "Options" section near the beginning of the
  95. relevant makefile for more information.
  96.  
  97. If you are including a dot-matrix printer driver, you may wish to
  98. customize the default resolution parameters in devs.mak.
  99.  
  100. To build the interpreter, you need all the .h and .c files (and .asm files
  101. for MS-DOS) included in the distribution, as well as the makefiles.
  102.  
  103. The command
  104.     make clean
  105. removes all the files created by the build process (relocatables,
  106. executables, and miscellaneous scratch files).  If you want to save the
  107. executable, you should move it to another directory first.
  108.  
  109. ********
  110. ******** How to build Ghostscript from source (MS-DOS version) ********
  111. ********
  112.  
  113. To find out what devices the makefiles distributed with Ghostscript
  114. select for inclusion in the executable, find the lines in the
  115. appropriate makefiles of the form
  116.     FEATURE_DEVS=<list of features>
  117. and
  118.     DEVICE_DEVS=<list of devices>
  119.     (similarly DEVICE_DEVS1... up to DEVICE_DEVS9)
  120. The relevant makefiles are:
  121.     Turbo C: tc.mak
  122.     Turbo C++/Borland C++, MS-DOS: bc.mak
  123.     Borland C++, MS Windows: bcwin.mak
  124.     Microsoft C/C++ 7.0, MS-DOS: msc.mak
  125.     Watcom C/386, MS-DOS: watc.mak
  126. The options were chosen to strike a balance between RAM consumption
  127. and likely usefulness.  (Turbo C is limited to 640K and does not
  128. support code overlaying; Borland C++ is limited to 640K, but supports
  129. code overlaying under MS-DOS; Watcom C/386 is not limited to 640K.)
  130.  
  131. To build Ghostscript, you need MS-DOS version 3.3 or later, and a
  132. (Borland) Turbo C/C++, Borland C/C++, Microsoft C/C++ (version 7), or
  133. Watcom C/386 development system.  Details are given below.
  134.  
  135. As noted above, the default configuration generates an executable that
  136. assumes the directory where 'make' was run should be the final default
  137. directory for looking up the Ghostscript initialization and font files.
  138.  
  139. To build the Ghostscript executable, all you need to do is give the
  140. command
  141.     make
  142. You must have COMMAND.COM in your path to build Ghostscript.
  143.  
  144. There is a special 'make' target that simply attempts to compile all the
  145. .c files in the current directory.  Some of these compilations will fail,
  146. but the ones that succeed will go considerably faster, because they don't
  147. individually pay the overhead of loading the compiler into memory.  So a
  148. good strategy for building the executable for the first time, or after a
  149. change to a very widely used .h file, is:
  150.     make begin
  151. and then
  152.     make
  153. to do the compilations that failed the first time.
  154.  
  155. Note: if you get the Ghostscript sources from a Unix 'tar' file and unpack
  156. the file on a MS-DOS machine, the files will all have linefeed instead of
  157. carriage return + linefeed as the line terminator, which may make the C
  158. compiler unhappy.  I don't know the simplest way to fix this: just reading
  159. each file into an editor and writing it back out again may be sufficient.
  160. You will probably have to do this to the .c, .h, and .bat files.
  161.  
  162. Borland environment
  163. -------------------
  164.  
  165. To compile Ghostscript with the Borland environment, you need either Turbo
  166. C (version 2.0 or later) or Turbo C++ or Borland C++ (version 1.0 or
  167. later); specifically, the compiler, 'make' utility, and linker.  You also
  168. need either the Borland assembler (version 1.0 or later) or the Microsoft
  169. assembler (version 4.0 or later).  Before compiling or linking, you should
  170. execute
  171.     echo !include "tc.mak" >makefile
  172. (for Turbo C and MS-DOS), or
  173.     echo !include "bc.mak" >makefile
  174. (for Turbo C++ or Borland C++ and MS-DOS), or
  175.     echo !include "bcwin.mak" >makefile
  176. (for Turbo C++ or Borland C++ and Microsoft Windows), or
  177.  
  178. Besides the source files and the makefiles, you need:
  179.     turboc.cfg (the flags and switches for Turbo C)
  180.     gs.tr (the linker commands for the interpreter)
  181.     *.bat (a variety of batch files used in the build process)
  182.  
  183. There are extensive comments in the aforementioned .mak files
  184. regarding various configuration parameters.  If your configuration is
  185. different from the following, you should definitely read those
  186. comments and see if you want or need to change any of the parameters:
  187.     - The compiler files are in c:\tc (for Turbo C) or c:\bc (for
  188. Turbo C++ or Borland C++) and its subdirectories.
  189.     - You are using the Borland assembler (tasm).
  190.     - You want an executable that will run on any PC-compatible,
  191. regardless of processor type (8088, 8086, V20, 80186, 80286, V30, 80386,
  192. 80486) and regardless of whether a math coprocessor (80x87) is present.
  193.  
  194. NOTE: Borland C++ 3.0 has two problems that affect Ghostscript (these
  195. problems are fixed in Borland C++ 3.1):
  196.  
  197.     - The assembler, tasm, often crashes when attempting to
  198. assemble g